import '../../../public.dart';

class NoBankCardViewWidget extends StatelessWidget {
  final UserModel model;

  const NoBankCardViewWidget({
    super.key,
    required this.model,
  });

  @override
  Widget build(BuildContext context) {
    return Center(
      child: Padding(
        padding: const EdgeInsets.all(16),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            Icon(Icons.account_balance, size: 80, color: Colors.grey[300]),
            const SizedBox(height: 16),
            Text(
              'No Bank Card',
              style: TextStyle(
                fontSize: 18,
                fontWeight: FontWeight.w600,
                color: Colors.grey[700],
              ),
            ),
            const SizedBox(height: 8),
            Text(
              'Please add a bank card first',
              style: TextStyle(fontSize: 14, color: Colors.grey[500]),
            ),
            const SizedBox(height: 24),
            ElevatedButton(
              onPressed: () async {
                final isAdd = await RouterHelper.navigator.pushNamed(
                  Routers.addBankCard,
                );
                if (isAdd != null && isAdd as bool) {
                  await model.getBankCardList();
                }
              },
              style: ElevatedButton.styleFrom(
                backgroundColor: const Color(0xFF1DE9B6),
                foregroundColor: Colors.white,
                padding: const EdgeInsets.symmetric(
                  horizontal: 24,
                  vertical: 12,
                ),
                shape: RoundedRectangleBorder(
                  borderRadius: BorderRadius.circular(8),
                ),
              ),
              child: const Text('Add Bank Card'),
            ),
          ],
        ),
      ),
    );
  }
}